<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <script src="https://cdn.tailwindcss.com"></script>
    <title>表格横向滚动条示例</title>
    <style>
      /* 为表格容器添加样式，设置固定宽度并启用横向滚动条 */
      .table-container {
            width: 300px;
            overflow-x: auto;
            -webkit-overflow-scrolling: touch;
        }
      /* 为表格添加样式，合并边框 */
      .table-container table {
            border-collapse: collapse;
        }
      /* 为表格的表头和单元格添加样式，设置边框和内边距 */
      .table-container th,
      .table-container td {
            border: 1px solid #ccc;
            padding: 8px;
            white-space: nowrap;
        }
    </style>
</head>
<body class="p-8">
    <div class="table-container">
        <table>
            <thead>
                <tr>
                    <th>姓名</th>
                    <th>年龄</th>
                    <th>职业</th>
                    <th>地址</th>
                    <th>联系方式</th>
                </tr>
            </thead>
            <tbody>
                <tr>
                    <td>张三</td>
                    <td>25</td>
                    <td>工程师</td>
                    <td>北京市朝阳区某街道 123 号</td>
                    <td>13800138000</td>
                </tr>
                <tr>
                    <td>李四</td>
                    <td>30</td>
                    <td>设计师</td>
                    <td>上海市浦东新区某大厦 456 室</td>
                    <td>13900139000</td>
                </tr>
            </tbody>
        </table>
    </div>
</body>
</html>
    